package day01;

/**
 * @author tongchen
 * @create 2022-11-27 9:17
 */
public class TestLanQiao {
    public static void main(String[] args) {
        //定义数字
        int n=15;
        int i = forHex(n);
        while(i%n!=0){
            n++;
        i=forHex(n);
        }
        System.out.println(n);
    }

    private static int  forHex(int n) {
        int index=0;
        int count=0;
        while(n>0){
            int num=n%10;
            //求十六进制位
            index++;
            int counts=index;
            while(counts>1){
                num*=16;
                counts--;
            }
            count+=num;
            //进行移位
            n/=10;
        }
        return count;
    }
}
